﻿




using System.Collections.Generic;
using System.Linq;
using Hotpot.Infrastructure;

namespace Hotpot.Modules.Conferences.Models.Extensions
{
    public static class ScheduleItemExtensions
    {
        public static IEnumerable<ICacheEntity> GetDependencies(this ScheduleItem scheduleItem)
        {
            List<ICacheEntity> dependencies = new List<ICacheEntity>();

            if (scheduleItem == null)
                return dependencies;

            dependencies.Add(scheduleItem);

            dependencies.Add(scheduleItem.Event);

            dependencies.AddRange(scheduleItem.Tags.Cast<ICacheEntity>());

            return dependencies;
        }
    }
}
